package com.huayousoft.demo.order.feign.fallback;

import com.huayousoft.demo.order.entity.Goods;
import com.huayousoft.demo.order.feign.GoodsFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 远程调用Goods的服务（feign）-熔断回调实现类
 * @author ZhangHua
 * @date 2020/11/20 14:01
 */
@Component
@Slf4j
public class GoodsFeignClientFallback implements GoodsFeignClient {

    @Override
    public List<Goods> list() {
        List<Goods>  goodsList = new ArrayList<>();
        log.info("GoodsFeignClientFallback-启动熔断回调方法");
        return goodsList;
    }
}
